import { appConfig } from '@/config/app'
import Cookies from 'js-cookie'

export const localCache = {
  setToken: s => {
    Cookies.set(appConfig.tokenKey, s, {expires: 7})
  },
  getToken: () => {
    return Cookies.get(appConfig.tokenKey)
  },
  clearToken: () => {
    Cookies.remove(appConfig.tokenKey)
  }
}